fix(devx): objectui pin changeset comes from declared changesets, not commit types (#4731) - #4842
Merged
xuyushun441-sys merged 2 commits intoAug 3, 2026
Conversation
… commit types (#4731) The @objectstack/console changeset written on an objectui pin bump used to guess which frontend commits belonged in the platform release record from conventional-commit types on the subject line, and guess the bump level the same way. On the real range 7d9734d5e321..785b8a5d432c (53 non-merge commits) the guess dropped all 13 releasing non-feat/fix commits — every breaking `refactor(...)!` among them — pulled in 5 commits that release nothing, and truncated at `head -40` in silence. objectui already declares the answer: every releasing PR carries a `.changeset/*.md`, an empty frontmatter block is changesets' own release-nothing marker, and the declared level is the bump. The new `scripts/objectui-changeset-digest.mjs` reads those declarations over the range; `bump-objectui.sh` writes what it produces. Nothing is capped by default, a cap that fires names the real remainder, omissions are counted in the body, and an unwalkable range emits a list labelled degraded. Guarded by `pnpm check:objectui-changeset` in Lint & Type Check.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This was referenced Aug 3, 2026
xuyushun441-sys
marked this pull request as ready for review
August 3, 2026 09:51
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Aug 3, 2026
…ectui-pin-changeset-from-changesets # Conflicts: # .github/workflows/lint.yml
xuyushun441-sys
deleted the
claude/issue-4731-objectui-pin-changeset-from-changesets
branch
August 3, 2026 10:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4731
为什么改判据,而不是补猜法
bump-objectui.sh写这个 changeset 的唯一理由,是补 #3340 那个洞:pin 一动、前端改动却在平台发布记录里查无此人。但它判断「这条提交算不算前端改动」用的是提交标题的 conventional-commit 类型 —— 一个猜。脚本真正要回答的问题是「这条提交在 objectui 侧发不发版」,而 objectui 已经声明了答案:每个发版 PR 都带一个
.changeset/*.md,frontmatter 里有包名才发版,空 frontmatter 就是 changesets 自己的 release-nothing 写法,级别(major/minor/patch)也是现成的。所以本 PR 取 issue 的建议 1:git log --diff-filter=A -- .changeset/拿到区间内新增的 changeset,清单和 bump 级别都从声明来,^feat那一路推断整条删掉。声明即依据,与本仓 contract-first 的方向一致(Prime Directive #12)。建议 2(放行!+ 排除ciscope + 补截断尾标)是在猜法上打补丁:能修掉这次实测到的三个后果,但下一种猜错的形态还会再来。实测:
7d9734d5e321..785b8a5d432c(53 个非 merge 提交)用真实 objectui 检出跑新旧两套逻辑,对同一区间:
head -40用掉 85%,无尾标)minor(grep -ciE '^feat'有命中)major(区间内声明的最高级别;RC pre-mode 下原样保留)fix(ci))旧过滤器漏掉的 13 条里,包含全部 6 条破坏性
refactor(...)!——refactor(layout)!: delete PageNodeRenderer(objectui#3225)、burn ledger batch 6/7(objectui#3220 / #3224)、batch 2/4/5 —— 另有 3 条非破坏性refactor、chore(deps): lockstep the @objectstack family onto 17.0.0-rc.1(objectui#3189),以及两条test(console)、一条wip(它们各自都带发版 changeset)。误收的 5 条:fix(ci)objectui#3198(压根没有 changeset)、fix(ci)objectui#3186(有 changeset,但 frontmatter 是空的 —— release-nothing)、fix(app-shell)#3187、fix(charts)#3138、fix(i18n)#3132(同为 release-nothing)。新逻辑对这 18 条的判断全部正确。与 issue 里 ground truth 的两处出入(核对过原始 git 历史,是 issue 的描述略有偏差,不是实现偏差):
refactor(...)!」。区间内实际是 9 条refactor,其中带!的 6 条;9 条全部被旧过滤器丢掉,issue 点名的两个例子(test(authz): e2e-prove the MCP HTTP surface is identity-admitted; upgrade the matrix row to high-risk (#3167) #3225、ThemanagedBy: 'system'bucket is overloaded (engine-only vs. admin-writable) — split the taxonomy; don't guard it wholesale #3220/feat(spec): compile-check skills/ TypeScript examples (anti-drift, #3094) #3224)都在其中。带!的提交区间内共 11 条,另外 5 条是feat!/fix!,本来就能通过类型过滤。fix(ci)「在 objectui 侧连 changeset 都没有」。objectui#3198 确实没有;objectui#3186 有.changeset/fix-cross-repo-closer-require.md,但 frontmatter 是空的,正文写着 "Release-nothing: touches.github/workflows/only"。结论相同(两条都被正确排除),但排除的机制值得记下来:空 frontmatter 是 objectui 明确说出的「不发版」,读声明的做法连这一层都能读懂,而类型猜测两条都会误收。截断必须出声
head。CONSOLE_CHANGES_MAX,默认 100)防止极端区间写出失控的文件;一旦触发就出声,尾标带真实数量:…and N more releasing changesets in this range (list capped at 100; …)。self-test 用--max 1专门验这条。⚠️ **Degraded list**并说明原因 —— 退化清单和完整清单在成品里必须长得不一样。一处需要维护者过目的判断:声明的
major怎么落到 console 上bump 级别取区间内声明的最高级别。但
@objectstack/console在 changesets 的fixedlockstep 组里,一个major会把整个 monorepo 顶上去,而scripts/check-changeset-no-major.mjs正是为此存在的门禁 —— objectui 例行把符号改名标成major,机械地透传会让每次常规 pin 刷新都撞门。所以这里照抄那个门禁自己的判据:仓库处于 changesets pre-release(RC)模式时,
major原样保留(RC 窗口本就是攒破坏性变更的地方 —— 当前main正在rc,上面实测区间因此落major);不在 pre-mode 时降为minor,遵循该门禁写明的 launch-window 惯例(「breaking 以 minor 发」),并在产物正文里出声说明降级及原因,破坏性条目本身一条不删。CONSOLE_BUMP仍可强制覆盖。若维护者更希望无条件透传major(靠allow-majorlabel 放行),删掉inPreMode()那一个分支即可。落点与验证
scripts/bump-objectui.sh—— 驱动;判据外移。scripts/objectui-changeset-digest.mjs(新)—— 读声明、算级别、渲染正文;带--self-test,是本仓scripts/的既有测试惯例。pnpm check:objectui-changeset接进Lint & Type Check。self-test 造两个一次性 git 仓库,复刻这次区间里的五种形态(releasing
feat、破坏性refactor(...)!、releasingchore(deps)、空 frontmatter 的fix(ci)、无 changeset 的fix(ci)),再跑真正的bump-objectui.sh断言产物 —— 20 条断言,含截断出声、退化出声、pre-mode 与非 pre-mode 两种级别落法、CONSOLE_BUMP覆盖。未改
packages/**,未碰content/docs/releases/。🤖 Generated with Claude Code
https://claude.ai/code/session_018iARDqtrhQgz6fVHDeDkbQ
Generated by Claude Code